#include<iostream>
using namespace std;
int main()
{
  int a,b;
  cin>>a>>b;
  a>9||b>20?cout<<"1":cout<<"0";
}